﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Maticsoft.BLL;
using Maticsoft.Model;

namespace Maticsoft.Web.Admin
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

            }
        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            BLL.salarystatistics sal = new BLL.salarystatistics();
            
            int id = Convert.ToInt32(e.CommandArgument);
            Model.salarystatistics salmod = sal.GetModel(id);
            salmod.verifyid = int.Parse(Session["userid"].ToString());
            switch (e.CommandName)
            {
                case "no":
                    salmod.verify = -1;
                    break;
                case "yes":
                    salmod.verify = 1;
                    break;
            }
            sal.Update(salmod);
            Page.RegisterStartupScript("success", "<script>alert('提交处理成功！')</script>");
            GridView1.DataBind();
        }
    }
}